package com.xd.core.api.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Date;

/**
 * <p>
 * 还款订单信息
 * </p>
 *
 * @author ZX
 * @since 2025-03-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="RepaymentOrderInfo对象", description="还款订单信息")
public class RepaymentOrderInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "order_no")
    @ApiModelProperty(value = "商户订单")
    private String orderNo;

    @ApiModelProperty(value = "申请金额(单位分)")
    private long amount;

    @ApiModelProperty(value = "还款类型（1-自动扣款本期应还+逾期和罚息，2-平台手动代扣本期应和逾期和罚息，3-线下打款还款本期应和逾期和罚息,4-自动线上扣款 (提前还款)(线上)5-平台手动代扣 (提前还款)(线上)6-线下还款 (提前还款)(线下)")
    private String type;

    @ApiModelProperty(value = "支付状态（1-申请中，2-成功，3-失败）")
    private String payStatus;

    @ApiModelProperty(value = "还款id")
    private Integer orderId;

    @ApiModelProperty(value = "债权id")
    private Integer debtId;

    @ApiModelProperty(value = "企业id")
    private Integer companyId;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "交易时间")
    private Date tradeTime;

    @ApiModelProperty(value = "失败原因")
    private String failCause;

    @ApiModelProperty(value = "借款人还款账户名")
    private String repayName;

    @ApiModelProperty(value = "借款人还款账户")
    private String repayAccount;

    @ApiModelProperty(value = "借款人还款开户银行")
    private String repayBank;

    @ApiModelProperty(value = "分账状态（0-未分，1-已分）")
    private String shareStatus;

    @ApiModelProperty(value = "回款服务费(单位:元)")
    private BigDecimal collectionAmount;

    @ApiModelProperty("进件ID")
    private Integer incomingId;

    @ApiModelProperty("放款ID")
    private Integer outId;

}
